package com.warframe.entity.database;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "RegexContent", schema = "main", catalog = "")
public class RegexContentEO {
    private Integer id;
    private String regexText;
    private Integer type;

    @Id
    @Column(name = "id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "regexText")
    public String getRegexText() {
        return regexText;
    }

    public void setRegexText(String regexText) {
        this.regexText = regexText;
    }

    @Basic
    @Column(name = "type")
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        RegexContentEO that = (RegexContentEO) o;
        return id == that.id &&
                type == that.type &&
                Objects.equals(regexText, that.regexText);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, regexText, type);
    }
}
